<script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="bootbox/bootbox.js"></script>
<script src="lib/plupload-2.1.2/js/plupload.full.min.js"></script>
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <strong>
                    <div ng-show="id">
                        修改医生信息
                    </div>
                    <div ng-hide="id">
                        添加医生信息
                    </div>
                </strong>
            </div>

            <div class="panel-body">
                <form name="uploadForm" class="form-horizontal" role="form" ng-submit="createOrUpdate()">
                    <div class="form-group" ng-show="error_msg">
                        <div class="col-sm-offset-1 col-sm-11">
                            <div class="alert alert-danger" role="alert">{{error_msg}}</div>
                        </div>
                    </div>

                    <input type="hidden" class="form-control" id="id" ng-model="id">

                    <div class="form-group span6">
                        <label for="name" class="col-sm-2 col-sm-offset-2 control-label">姓名</label>

                        <div class="col-sm-4">
                            <input type="text" required="true" class="form-control" id="name" placeholder="请输入医生姓名"
                                   ng-model="name">
                        </div>
                    </div>

                    <div class=" form-group span6 ">

                        <div class="col-sm-4 col-sm-offset-4">
                            <div id="preview" class="preview">
                                <img ng-src="{{image_url}}" width=0 alt="" ng-show="image_ready">
                            </div>
                                <input type="hidden" class="form-control" id="avatar" ng-model="avatar">
                            <div class="progress hidden" style="margin-top: 10px">
                                <div class="progress-bar" role="progressbar" aria-valuenow="50" aria-valuemin="100"
                                     style="width: 0%">
                                    0
                                </div>
                            </div>
                            <div id="container_doctor">
                                <a id="pickfiles_doctor" href="javascript:;">[选择文件...]</a>
                            </div>
                        </div>
                    </div>

                    <div class="form-group" ng-show="role == 1">
                        <label for="province" class="col-sm-2  col-sm-offset-2 control-label">所属省份</label>

                        <div class="col-sm-4 ">
                            <select ng-model="province"
                                    ng-change="provinceChanged(province)"
                                    class="form-control" id="province"
                                    ng-options="item._id as item.name for item in provinces">
                                <option value="">请选择省份</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group" ng-show="role == 1">
                        <label for="hospital" class="col-sm-2  col-sm-offset-2 control-label">所属医院</label>

                        <div class="col-sm-4 ">
                            <select id="hospital"
                                    ng-model="hospital"
                                    class="form-control"
                                    ng-change="hospitalChanged(hospital)"
                                    ng-options="item._id as item.name for item in hospitals">
                                <option value="">请选择医院</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="office" class="col-sm-2  col-sm-offset-2 control-label">所属科室</label>

                        <div class="col-sm-4 ">
                            <select id="office"
                                    ng-model="office"
                                    class="form-control"
                                    ng-options="item._id as item.name for item in offices">
                                <option value="">请选择科室</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group span6">
                        <label for="name" class="col-sm-2 col-sm-offset-2 control-label">职称</label>

                        <div class="col-sm-4">
                            <input type="text" required="true" class="form-control" id="title" placeholder="职称"
                                   ng-model="title">
                        </div>
                    </div>

                    <div class="form-group span6">
                        <label for="name" class="col-sm-2 col-sm-offset-2 control-label">专业</label>

                        <div class="col-sm-4">
                            <input type="text" required="true" class="form-control" id="major" placeholder="专业"
                                   ng-model="major">
                        </div>
                    </div>

                    <div class="form-group span6">
                        <label for="name" class="col-sm-2 col-sm-offset-2 control-label">联系电话</label>

                        <div class="col-sm-4">
                            <input type="text" required="true" class="form-control" id="phone" placeholder="联系电话"
                                   ng-model="phone">
                        </div>
                    </div>

                    <div class="form-group span6">
                        <label for="introduce" class="col-sm-2 col-sm-offset-2 control-label">简介</label>

                        <div class="col-sm-4">
                            <textarea class="form-control" required="true" class="form-control" id="introduce"
                                      ng-model="introduce" rows="3"></textarea>
                        </div>
                    </div>


                    <div class="form-actions">
                        <button type="submit" class="btn btn-default col-sm-offset-4 col-sm-1">确定</button>
                        <button type="button" class="btn col-sm-1 cancel_btn" ng-click="cancel()">取消</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>